package com.taomeishu.mailcrazy;

import java.util.ArrayList;
import java.util.List;

public class CheckResult {
	
	private boolean success;
	
	private Mail mail;
	
	private List<Mail> existMails = new ArrayList<Mail>();
	
	private List<Mail> notExistMails = new ArrayList<Mail>();

	public CheckResult(boolean success) {
		super();
		this.success = success;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public Mail getMail() {
		return mail;
	}

	public void setMail(Mail mail) {
		this.mail = mail;
	}
	
	public void addExistMail(Mail mail) {
		existMails.add(mail);
	}

	public void addNotExistMail(Mail mail) {
		notExistMails.add(mail);
	}
	
	public List<Mail> getExistMails() {
		return existMails;
	}

	public List<Mail> getNotExistMails() {
		return notExistMails;
	}

	@Override
	public String toString() {
		return "check for mail " + mail + ":\r\nexist Mails: " + existMails + "\r\n"
				+ "not exist Mails:" + notExistMails;
	}
}
